# -*- coding: utf-8 -*-


import os
from os import path as osp
import shutil

from tool import filesystem


if __name__ == "__main__":
    data_dir = r"F:\work\dataset\ocr\plate\get_test\images"
    save_dir = r"F:\work\dataset\ocr\plate\get_test\run"
    files = filesystem.get_all_filepath(data_dir, "jpg")
    
    if osp.exists(save_dir):
        os.makedirs(save_dir)

    for f in files:
        filename = osp.basename(f)
        save_path = osp.join(save_dir, filename

        # shutil.copy(f, save_path)
        shutil.copy(f, save_path)

        print(save_path)
